package com.qf.eduadmin.controller;

import com.qf.eduadmin.pojo.resp.ResponseData;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Mr.Liu
 * @date 2021/12/29 22:38
 */
@ControllerAdvice
@ResponseBody
public class ExcepitonController {
    @ExceptionHandler(AuthorizationException.class)
    public ResponseData authorizationException(){
        return new ResponseData(0,"用户无权限访问",null,null);
    }
}
